package test;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;

public class IOTest2 {
    public static void main(String[] args) throws Exception {
        File file = new File("f:/222.txt");
        OutputStream out = new FileOutputStream(file);
        String str = "ni shi ha ma pi";
        byte[] bytes = str.getBytes("utf-8");
        out .write(bytes);
        out.close();
    }
}
